/**
 * Copyright (c) 2012 Ben Murphy (Smurph)
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.smurph.expandablelist.provider;

import android.net.Uri;

import com.smurph.expandablelist.provider.TblABC.ABCs;

public class TblName {

	public static final String[] names = { "Geoffrey Hampton",
		"Ciaran Holcomb", "Marshall Kelly", "Mufutau Saunders",
		"Ishmael Durham", "Brock Golden", "Dalton Britt", "Tad Wright",
		"Carl Olsen", "Jack Cote", "Damian Carpenter", "Burke Cochran",
		"Sebastian Mcmahon", "Talon Stout", "Anthony Johnston",
		"Calvin Howell", "Simon Hale", "Talon Leon", "Stephen Mayo",
		"Ezra Graham", "Ryan Juarez", "Nathan Bowman", "Kermit Mcclure",
		"Axel Rhodes", "David Maynard", "Wing Larsen", "Noah Buchanan",
		"Nathan Mayer", "Nigel Mccormick", "Herrod Rivera",
		"Armando Meyers", "Colin Velasquez", "Zeus Brooks",
		"Hilel Stafford", "Merrill Russo", "Cole Lang", "Dieter Velez",
		"Lance Stokes", "Jarrod Oneil", "Louis Robbins", "Daquan Mclean",
		"Dorian Wong", "Nicholas Adams", "Kaseem Holt", "Kevin Alvarado",
		"Clarke Munoz", "Logan Holmes", "Kennedy Moody", "Joshua Barker",
		"Jamal David" };
	
	
	public TblName() {
	}
	
	public static final String mCreate_Table = "CREATE TABLE " + Names.TBL_NAMES
			+ " ( " + Names._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ Names.NAME + "  TEXT, " 
			+ Names.ABC_ID + "  INTEGER, " 
			+ Names.ACTIVE + " BOOLEAN DEFAULT(1));";
	
	public static final class Names {
		public Names() {
		}

		public static final String TBL_NAMES = "TblNames";
		public static final String _ID = "_id";
		public static final String NAME = "Name";
		public static final String ABC_ID = "Abc_id";
		public static final String ACTIVE = "Active";

		public static final Uri CONTENT_URI = Uri.parse("content://"
				+ MyContentProvider.AUTHORITY + "/" + TBL_NAMES);
		public static final Uri CONTENT_URI_BY_ABC_ID = Uri.parse("content://"
				+ MyContentProvider.AUTHORITY + "/" + TBL_NAMES + "/#");

		public static final String SORT_ORDER_DESC = NAME + " DESC";
		public static final String SORT_ORDER_ASC = NAME + " ASC";

		public static final String[] DEFAULT_PROJECTION = new String[] { _ID,
				NAME, ABC_ID, ACTIVE };
		public static final String[] JUST_NAMES_PROJECTION = new String[] { _ID,
			NAME };
		
		public static final String NAMES_ABC_JOIN = TBL_NAMES
				+ " LEFT JOIN " + ABCs.TBL_ABC + " ON " + ABCs.TBL_ABC + "." + ABCs._ID + " = "
				+ TBL_NAMES + "." + ABC_ID;
	}
}
